﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestModule
{
    /// <summary>
    /// 绘图单元符号
    /// </summary>
    public class NodeSymbol
    {
        /// <summary>
        /// 序号
        /// </summary>
        private int _index = 0;
        public int Index
        {
            get { return _index; }
            set { _index = value; }
        }

        /// <summary>
        /// 是否显示编号
        /// </summary>
        private bool _bNo = true;
        public bool BNo
        {
            get { return _bNo; }
            set { _bNo = value; }
        }

        /// <summary>
        /// 是否显示注释
        /// </summary>
        private bool _bRemark = true;
        public bool BRemark
        {
            get { return _bRemark; }
            set { _bRemark = value; }
        }

        /// <summary>
        /// 注释标签
        /// </summary>
        private string _remark = string.Empty;
        public string Remark
        {
            get { return _remark; }
            set { _remark = value; }
        }

        /// <summary>
        /// 绘图颜色，默认为黑色
        /// </summary>
        private Color _penColor = Color.Black;
        public Color PenColor
        {
            get { return _penColor; }
            set { _penColor = value; }
        }

        /// <summary>
        /// 绘图方法，必须由子类继承实现
        /// </summary>
        public virtual void Draw(Graphics img)
        {
            throw new Exception("指定的绘图单元类型错误");
        }
    }
}
